package com.VolunteerPlatform.Dao;

import com.VolunteerPlatform.Entity.VolunteerInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.method.P;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface VolunteerInfoDao {


    public List<VolunteerInfo> getVolunteerInfo(@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("Gender") String Gender,@Param("Unit") String Unit,@Param("Phonenum") String Phonenum,@Param("Deleted") int Deleted,@Param("Page") int Page,@Param("PageList") int PageList);

    public int updateVolunteerInfo(@Param("OriginIDCardNumber") String OriginIDCardNumber,@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("Gender") String Gender,@Param("Birthday") String Birthday,@Param("Unit") String Unit,@Param("Phonenum") String Phonenum,@Param("Deleted") int Deleted);

    public int updateVolunteerInfoBatch(@Param("UpdateList") List<Map<String,String>> list, @Param("flag") int flag);

    public int insertVolunteerInfo(@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("Gender") String Gender,@Param("Birthday") String Birthday,@Param("Unit") String Unit,@Param("Phonenum") String Phonenum,@Param("Deleted") int Deleted);

    public List<VolunteerInfo> findByIDCardNumber(@Param("IDCardNumber") String IDCardNumber);


    public List<VolunteerInfo> getVolunteerInfoLike(@Param("IDCardNumber") String IDCardNumber,@Param("Name") String Name,@Param("Gender") String Gender,@Param("Unit") String Unit,@Param("Phonenum") String Phonenum,@Param("Deleted") int Deleted,@Param("Page") int Page,@Param("PageList") int PageList);

}
